package com.hundsun.fmbp.deploy.bean;

import java.util.ArrayList;
import java.util.List;

import lombok.Data;

@Data
public class PackageBean {
    private String name;
    private String path;
    private boolean checked;
    private int dispatcher;// 1表示调度1.0,2表示2.0
    private String version;
    private List<SqlBean> sqlList;
    private String productId;// 产品线,只有接口包使用

    public PackageBean() {
        this.checked = false;
        sqlList = new ArrayList<SqlBean>();
    }

    public void setName(String name) {
        this.name = name;
        if (name.indexOf("ETL2.0") != -1 || name.indexOf("etl2.0") != -1) {
            this.dispatcher = 2;
        } else {
            this.dispatcher = 1;
        }
    }

}
